<script setup lang="ts">
import UserInfoMsg from "~/components/user/userInfoMsg.vue";
import {getUserInfo} from "~/api/userApi";
import {getProjectList} from "~/api/projectApi";
import {ref} from "vue";
import {constantStore} from "~/stores/constantStore";

useHead({
  title: constantStore().webTitle + ' -- 个人主页',
  meta: [
    {name: 'keywords', content: constantStore().webKeywords},
    {name: 'description', content: constantStore().webDescription}
  ],
})

const route = useRoute()
const id = route.params.id

let {data: userRes} = await useAsyncData('getUserInfo', () => getUserInfo(id));
const userInfo = ref(constantStore().parseRes(userRes));


</script>

<template>
  <div class="user-message-box" v-if="userInfo">
    <div class="info-box">
      <user-info-msg :user="userInfo"/>
    </div>
    <div class="other-message-box">
      <div class="tab-box">
<!--        {{ userInfo }}-->
      </div>
    </div>
  </div>
  <div class="none-user" v-else>
    <el-empty description="未找到用户信息"/>
  </div>
</template>

<style scoped lang="scss">
.user-message-box {

}

.none-user {
  user-select: none;
}
</style>